package old.factory.simple;

public class CarFactory {
    public static Car getCat(String name){
        Car car = switch (name) {
            case "五菱" -> new HuLing();
            case "大众" -> new DaZhong();
            default -> new HuLing();
        };
        return car;
    }
}
